package com.example.chenjun.myapplication.mvp.presenter;

import com.example.chenjun.myapplication.mvp.contract.CookDetailContract;
import com.example.chenjun.myapplication.net.netcallback.BaseCallback;
import com.example.chenjun.myapplication.util.Logger;

import org.json.JSONObject;

public class CookInfoPresenter extends CookDetailContract.AbstractCookInfoPresenter {
    @Override
    public void getCookDetail(String cookId) {
        getModel().getCookDetail(cookId, new BaseCallback() {
            @Override
            protected Object parse(JSONObject json) {
                return json.toString();
            }

            @Override
            public void onResponse(Object o) {
                Logger.i(o.toString());
            }

            @Override
            public void onError(Exception e) {

            }
        });
    }
}
